package com.fita.api.handler;

import javax.xml.bind.JAXBException;
import javax.xml.bind.PropertyException;
import javax.xml.parsers.ParserConfigurationException;

import org.opentravel.ota._2003._05.OTAVehLocSearchRS;

import com.demo2do.core.entity.page.Page;
import com.fita.api.dto.request.CancelExistingVehicleReservationRequest;
import com.fita.api.dto.request.LocationDetailRequest;
import com.fita.api.dto.request.LocationSearchRequest;
import com.fita.api.dto.request.VehicleReservationRequest;
import com.fita.api.dto.request.VehicleSearchRequest;
import com.fita.entity.dto.ehi.response.LocationDetailResponse;
import com.fita.entity.dto.ehi.response.VehicleReservationCancleResponse;
import com.fita.entity.dto.ehi.response.VehicleReservationResponse;
import com.fita.entity.dto.ehi.response.VehicleSearchResponse;

/**
 *
 * @author Ark
 * @author LZJ
 *
 */
public interface WebserviceHandler {
    
    /**
     * search available vehicle by page
     * 
     * @param request
     * @param page
     * @return
     * @throws JAXBException 
     */
    public VehicleSearchResponse searchAvailableVehicle(VehicleSearchRequest request, Page page) throws JAXBException;
    
    /**
     * 下单
     * @param request
     * @return
     * @throws JAXBException
     * @throws ParserConfigurationException
     */
    public VehicleReservationResponse reservationVehicle(VehicleReservationRequest request) throws JAXBException, ParserConfigurationException;
    
    /**
     * 定位
     * 
     * @param request
     * @param page
     * @return
     * @throws JAXBException
     */
    public OTAVehLocSearchRS searchLocation(LocationSearchRequest request,Page page) throws JAXBException;
    
    /**
     * 位置详情
     * 
     * @param request
     * @param page
     * @return
     * @throws JAXBException
     * @throws ParserConfigurationException
     */
    public LocationDetailResponse locationDetail(LocationDetailRequest request,Page page) throws JAXBException, ParserConfigurationException;    
    
    /**
     * 取消订单
     * @param request
     * @return
     * @throws PropertyException
     * @throws JAXBException
     */
    public VehicleReservationCancleResponse cancelReservation(CancelExistingVehicleReservationRequest request) throws PropertyException, JAXBException;
    
    
}
